<include file="Public/header"/>
<div class="itempic-body">
    <div class="xydemo" id="itempicDemo" style="display: block;">
        <?php foreach ($list as $item) { ?>
            <div class="itempic-li">
                <a href="<?php echo $item['url']; ?>" class="itemlink" style="background-image:url(<?php echo $item['pic']; ?>)">
                    <div class="itemtxt-wrap">
                    <span class="itemtxt">
<!--                        <span class="tit">--><?php //echo $item['name']; ?><!--</span>-->
<!--                        <span class="word">--><?php //echo $item['description']; ?><!--</span>-->
                    </span>
                    </div>
                </a>
            </div>
        <?php } ?>
    </div>
    <div class="itempic-list" id="itempicList"></div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        var itemListArr = <?php echo $jsonData; ?>;
        //初始化函数
        function itemListInit(itemListArr){
            var maxNum = 4;
            var imgNum = itemListArr.length;
            var bodyH = $('body').height();
            var diffNum = (imgNum <= maxNum) ? imgNum : maxNum;
            var imgH = bodyH / diffNum;
            $(".itempic-li").css({
                "height": imgH
            });
        }
        //列表初始化
        itemListInit(itemListArr);
    });
</script>
<include file="Public/footer"/>
